﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BuyManager : MonoBehaviour {

    private static BuyManager _instance;
    public static BuyManager Instance
    {
        get
        {
            return _instance;
        }
    }
    private BuyManager()
    {
        _instance = this;
    }

    GameObject BuyWindow;
    GameObject StarWindow;
    void Start()
    {
        BuyWindow = GameObject.Find("Canvas").transform.Find("ConstructPanel").gameObject;
        StarWindow = GameObject.Find("Canvas").transform.Find("StatPanel").gameObject;
    }

    [HideInInspector]
    public int BatteryID;
    [HideInInspector]
    public GameObject TargetPlanet;
    public void BuyType(string Type)
    {
        TargetPlanet.transform.root.GetComponent<PlanetInteract>().Construct(BatteryID, Type);
    }

    public void ShutWindow()
    {
        BuyWindow.SetActive(false);
        StarWindow.SetActive(false);
    }
}
